<template>
	<div class="index">
		<div class="header">
			<span class="logo"><img src="../img/logo@3x.png" @click="zhuye()"/></span>
			<div class="seach-box" @click="seachStuta==true&&seachbtn()">
				<i class="seachimg"><img src="../img/icon_search@3x.png"/></i>
				<span v-show="seachshow">搜索商品</span>
				<form action="javascript:;" v-show="seachinput">
					<input type="search" name="" id="seach" value="" v-model="seachvalue" placeholder="搜索商品" @keyup.enter="seachsend" autofocus="autofocus" />
				</form>

			</div>
			<router-link :to="nt_user!=0?'/informationlist':'/login'" class="xiaoxi" v-show="!seachrmshow"><img src="../img/icon_news@3x.png" /><span id="xmessage"></span></router-link>
			<span class="qxsousuo dasousuo" v-show="seachrmshow" @click="seachremove()">取消</span>
		</div>
		<div class="bannert">
			<img src="../img-taqing/banner@2x.png" />
		</div>
		
		<div class="shop">
			<!--优惠券-->
			<ul class="shop-yhq">
				<li class="shop-yhq1">
					<a href="http://www.ntyouxuan.com/newnt/#/discountlq?id=177"><img src="../img-taqing/5yhq@2x.png" /></a>
				</li>
				<li class="shop-yhq2">
					<a href="http://www.ntyouxuan.com/newnt/#/discountlq?id=178"><img src="../img-taqing/10yhq@2x.png" /></a>
				</li>
			</ul>
			<!--优质特产-->
			<div class="shop-yztc">
				<img class="shop-yztc-logo" src="../img-taqing/title 1@2x.png" />
				<div class="shop-yztc-list">
					<ul>
						<li>
							<a href="" class="shop-yztc-list-link1"><img id="shop-yztc-list-img1" src="" /></a>
						</li>
						<li>
							<a href="" class="shop-yztc-list-link2"><img id="shop-yztc-list-img2" src="" /></a>
						</li>
						<br />
						<li>
							<a href="" class="shop-yztc-list-link3"><img id="shop-yztc-list-img3" src="" /></a>
						</li>
						<li>
							<a href="" class="shop-yztc-list-link4"><img id="shop-yztc-list-img4" src="" /></a>
						</li>
					</ul>
				</div>
			</div>
			<!--精品五折起-->
			<div class="shop-jpwz">
				<img class="shop-jpwz-logo" src="../img-taqing/title 2@2x.png" />
				<div class="shop-jpwz-list">
					<ul>
						<li>
							<a href="http://www.ntyouxuan.com/newnt/#/shopXQ/1175"><img src="../img-taqing/hz@2x.png" /></a>
						</li>
						<li>
							<a href="http://www.ntyouxuan.com/newnt/#/shopXQ/1161"><img src="../img-taqing/jd@2x.png" /></a>
						</li>
						<li>
							<a href="http://www.ntyouxuan.com/newnt/#/shopXQ/1223"><img src="../img-taqing/ldb@2x.png" /></a>
						</li>
						<li>
							<a href="http://www.ntyouxuan.com/newnt/#/shopXQ/934"><img src="../img-taqing/nrj@2x.png" /></a>
						</li>
					</ul>
				</div>
			</div>
			<!--新鲜水果正当时-->
			<div class="shop-xxsg">
				<img class="shop-xxsg-logo" src="../img-taqing/title 3@2x.png" />
				<ul class="shop-xxsg-list">
					<a class="xxsglj1" href=""><li>
						<img  class="shop-xxsg-list-tt xxsg1" src="" />
						<p class="bt xxsg-bt1x">广西南宁鲜玉芒8斤装</p>
						<div class="jiagexx">
							<p class="yj">原价:<span class="xxsg-yj1"></span></p>
							<p class="hdj">活动价:<span class="xxsg-hdj1"></span></p>
						</div>
						<img class="shop-xxsg-list-btn" src="../img-taqing/btn_lijiqianggou@2x.png" />
					</li></a>
					<a class="xxsglj2" href=""><li>
						<img  class="shop-xxsg-list-tt xxsg2" src="" />
						<p class="bt xxsg-bt2x">山西运城红富士7斤装</p>
						<div class="jiagexx">
							<p class="yj">原价:<span class="xxsg-yj2"></span></p>
							<p class="hdj">活动价:<span class="xxsg-hdj2"></span></p>
						</div>
						<img class="shop-xxsg-list-btn" src="../img-taqing/btn_lijiqianggou@2x.png" />
					</li></a>
					<a class="xxsglj3" href=""><li>
						<img  class="shop-xxsg-list-tt xxsg3" src="" />
						<p class="bt xxsg-bt3x">陕西贡梨5斤装</p>
						<div class="jiagexx">
							<p class="yj">原价:<span class="xxsg-yj3"></span></p>
							<p class="hdj">活动价:<span class="xxsg-hdj3"></span></p>
						</div>
						<img class="shop-xxsg-list-btn" src="../img-taqing/btn_lijiqianggou@2x.png" />
					</li></a>
					<a class="xxsglj4" href=""><li>
						<img  class="shop-xxsg-list-tt xxsg4" src="" />
						<p class="bt xxsg-bt1x">四川蒲江丑橘5斤装</p>
						<div class="jiagexx">
							<p class="yj">原价:<span class="xxsg-yj4"></span></p>
							<p class="hdj">活动价:<span class="xxsg-hdj4"></span></p>
						</div>
						<img class="shop-xxsg-list-btn" src="../img-taqing/btn_lijiqianggou@2x.png" />
					</li></a>
				</ul>
			</div>
			<!------人间美味屯起来-------->
			<div style="height: 490px;"></div>
			<div class="shop-xxsg" id="ddd">
				<img class="shop-xxsg-logo" src="../img-taqing/title 4@2x.png" />
				<ul class="shop-xxsg-list">
					<a class="rqmwlj1" href=""><li>
						<img  class="shop-xxsg-list-tt rqmw1" src="" />
						<p class="bt rqmw-bt1x">台湾正宗手抓饼30片</p>
						<div class="jiagexx">
							<p class="yj">原价:<span class="rqmw-yj1"></span></p>
							<p class="hdj">活动价:<span class="rqmw-hdj1"></span></p>
						</div>
						<img class="shop-xxsg-list-btn" src="../img-taqing/btn_lijiqianggou@2x.png" />
					</li></a>
					<a class="rqmwlj2" href=""><li>
						<img  class="shop-xxsg-list-tt rqmw2" src="" />
						<p class="bt rqmw-bt2x">山东烟台花蛤罐头100g*2</p>
						<div class="jiagexx">
							<p class="yj">原价:<span class="rqmw-yj2"></span></p>
							<p class="hdj">活动价:<span class="rqmw-hdj2"></span></p>
						</div>
						<img class="shop-xxsg-list-btn" src="../img-taqing/btn_lijiqianggou@2x.png" />
					</li></a>
					<a class="rqmwlj3" href=""><li>
						<img  class="shop-xxsg-list-tt rqmw3" src="" />
						<p class="bt rqmw-bt3x">浙江三门即食香菇脆88g</p>
						<div class="jiagexx">
							<p class="yj">原价:<span class="rqmw-yj3"></span></p>
							<p class="hdj">活动价:<span class="rqmw-hdj3"></span></p>
						</div>
						<img class="shop-xxsg-list-btn" src="../img-taqing/btn_lijiqianggou@2x.png" />
					</li></a>
					<a class="rqmwlj4" href=""><li>
						<img  class="shop-xxsg-list-tt rqmw4" src="" />
						<p class="bt rqmw-bt4x">贵州清镇刺梨干108g</p>
						<div class="jiagexx">
							<p class="yj">原价:<span class="rqmw-yj4"></span></p>
							<p class="hdj">活动价:<span class="rqmw-hdj4"></span></p>
						</div>
						<img class="shop-xxsg-list-btn" src="../img-taqing/btn_lijiqianggou@2x.png" />
					</li></a>
				</ul>
			</div>
			<!--优质特产大聚会-->
			<div style="height: 490px;"></div>
			<div class="shop-xxsg" id="ddd">
				<img class="shop-xxsg-logo" src="../img-taqing/title 5@2x.png" />
				<ul class="shop-xxsg-list">
					<a class="yztclj1" href=""><li>
						<img  class="shop-xxsg-list-tt yztc1" src="" />
						<p class="bt yztc-bt1x">江苏泰州鹌鹑蛋140个</p>
						<div class="jiagexx">
							<p class="yj">原价:<span class="yztc-yj1"></span></p>
							<p class="hdj">活动价:<span class="yztc-hdj1"></span></p>
						</div>
						<img class="shop-xxsg-list-btn" src="../img-taqing/btn_lijiqianggou@2x.png" />
					</li></a>
					<a class="yztclj2" href=""><li>
						<img  class="shop-xxsg-list-tt yztc2" src="" />
						<p class="bt yztc-bt2x">浙江温州西门岛虾干500g</p>
						<div class="jiagexx">
							<p class="yj">原价:<span class="yztc-yj2"></span></p>
							<p class="hdj">活动价:<span class="yztc-hdj2"></span></p>
						</div>
						<img class="shop-xxsg-list-btn" src="../img-taqing/btn_lijiqianggou@2x.png" />
					</li></a>
					<a class="yztclj3" href=""><li>
						<img  class="shop-xxsg-list-tt yztc3" src="" />
						<p class="bt yztc-bt3x">安徽东至生态银耳250g</p>
						<div class="jiagexx">
							<p class="yj">原价:<span class="yztc-yj3"></span></p>
							<p class="hdj">活动价:<span class="yztc-hdj3"></span></p>
						</div>
						<img class="shop-xxsg-list-btn" src="../img-taqing/btn_lijiqianggou@2x.png" />
					</li></a>
					<a class="yztclj4" href=""><li>
						<img  class="shop-xxsg-list-tt yztc4" src="" />
						<p class="bt yztc-bt1x">陕西宜君薄皮核桃250g</p>
						<div class="jiagexx">
							<p class="yj">原价:<span class="yztc-yj4"></span></p>
							<p class="hdj">活动价:<span class="yztc-hdj4"></span></p>
						</div>
						<img class="shop-xxsg-list-btn" src="../img-taqing/btn_lijiqianggou@2x.png" />
					</li></a>
					<a class="yztclj5" href=""><li>
						<img  class="shop-xxsg-list-tt yztc5" src="" />
						<p class="bt yztc-bt5x">山西高平红薯宽粉900g</p>
						<div class="jiagexx">
							<p class="yj">原价:<span class="yztc-yj5"></span></p>
							<p class="hdj">活动价:<span class="yztc-hdj5"></span></p>
						</div>
						<img class="shop-xxsg-list-btn" src="../img-taqing/btn_lijiqianggou@2x.png" />
					</li></a>
					<a class="yztclj6" href=""><li>
						<img  class="shop-xxsg-list-tt yztc6" src="" />
						<p class="bt yztc-bt6x">江苏溧阳农家灌肠450g</p>
						<div class="jiagexx">
							<p class="yj">原价:<span class="yztc-yj6"></span></p>
							<p class="hdj">活动价:<span class="yztc-hdj6"></span></p>
						</div>
						<img class="shop-xxsg-list-btn" src="../img-taqing/btn_lijiqianggou@2x.png" />
					</li></a>
				</ul>
			</div>
			<!--------纯粮酿造酒更香--------------->
			<div style="height: 726px;"></div>
			<div class="shop-xxsg" id="ddd" style="margin-top: 50px;">
				<img class="shop-xxsg-logo" src="../img-taqing/title 6@2x.png" />
				<ul class="shop-xxsg-list">
					<a class="clnzlj1" href=""><li>
						<img  class="shop-xxsg-list-tt clnz1" src="" />
						<p class="bt clnz-bt1x">贵州清镇邦当糯米酒500ml</p>
						<div class="jiagexx">
							<p class="yj">原价:<span class="clnz-yj1"></span></p>
							<p class="hdj">活动价:<span class="clnz-hdj1"></span></p>
						</div>
						<img class="shop-xxsg-list-btn" src="../img-taqing/btn_lijiqianggou@2x.png" />
					</li></a>
					<a class="clnzlj2" href=""><li>
						<img  class="shop-xxsg-list-tt clnz2" src="" />
						<p class="bt clnz-bt2x">贵州清镇桃花酒500ml</p>
						<div class="jiagexx">
							<p class="yj">原价:<span class="clnz-yj2"></span></p>
							<p class="hdj">活动价:<span class="clnz-hdj2"></span></p>
						</div>
						<img class="shop-xxsg-list-btn" src="../img-taqing/btn_lijiqianggou@2x.png" />
					</li></a>
					<a class="clnzlj3" href=""><li>
						<img  class="shop-xxsg-list-tt clnz3" src="" />
						<p class="bt clnz-bt3x">贵州清镇青梅酒415ml</p>
						<div class="jiagexx">
							<p class="yj">原价:<span class="clnz-yj3"></span></p>
							<p class="hdj">活动价:<span class="clnz-hdj3"></span></p>
						</div>
						<img class="shop-xxsg-list-btn" src="../img-taqing/btn_lijiqianggou@2x.png" />
					</li></a>
					<a class="clnzlj4" href=""><li>
						<img  class="shop-xxsg-list-tt clnz4" src="" />
						<p class="bt clnz-bt1x">贵州清镇樱桃酒415ml</p>
						<div class="jiagexx">
							<p class="yj">原价:<span class="clnz-yj4"></span></p>
							<p class="hdj">活动价:<span class="clnz-hdj4"></span></p>
						</div>
						<img class="shop-xxsg-list-btn" src="../img-taqing/btn_lijiqianggou@2x.png" />
					</li></a>
					<a class="clnzlj5" href=""><li>
						<img  class="shop-xxsg-list-tt clnz5" src="" />
						<p class="bt clnz-bt5x">贵州清镇黑葡萄酒415ml</p>
						<div class="jiagexx">
							<p class="yj">原价:<span class="clnz-yj5"></span></p>
							<p class="hdj">活动价:<span class="clnz-hdj5"></span></p>
						</div>
						<img class="shop-xxsg-list-btn" src="../img-taqing/btn_lijiqianggou@2x.png" />
					</li></a>
					<a class="clnzlj6" href=""><li>
						<img  class="shop-xxsg-list-tt clnz6" src="" />
						<p class="bt clnz-bt6x">贵州清镇桑葚酒415ml</p>
						<div class="jiagexx">
							<p class="yj">原价:<span class="clnz-yj6"></span></p>
							<p class="hdj">活动价:<span class="clnz-hdj6"></span></p>
						</div>
						<img class="shop-xxsg-list-btn" src="../img-taqing/btn_lijiqianggou@2x.png" />
					</li></a>
				</ul>
			</div>
			<!--返回顶部-->
			<div class="footer-btn">
				<img @click="top()" src="../img-taqing/fhdb@2x.png" />
			</div>
			<div class="footer-wz">
				<span>- 优质特产&nbsp;&nbsp;&nbsp;与你分享 -</span>
			</div>
			<div style="height: 20px;"></div>
		</div>
		<seachrm v-if="seachrmshow" @seachitems="seachsendtow"></seachrm>
		
	</div>
</template>

<script>
	import seachrm from '@/components/seachview/seachmodel'
	import wx from 'weixin-js-sdk'
	
	var furl = 'http://www.ntyouxuan.com/'
	export default{
		data () {
			return {
				ind:0,
				seachshow:true,
				seachStuta: true,
				seachinput: false,
				arealist:[],
				seachvalue:'',
				seachrmshow:false,
				wxdata:{
					'appid':'',
					'timestamp':'',
					'wxnonceStr':'',
					'wxShal':'',
					'title':'',
					'title_desc':'',
					'link':'',
					'img_url':'',
				},
				aurl:''
			}
		},
		created:function(){
		},
		methods:{
			isWeiXin() {
		      let ua = window.navigator.userAgent.toLowerCase();
		      //mozilla/5.0 (iphone; cpu iphone os 9_1 like mac os x) applewebkit/601.1.46 (khtml, like gecko)version/9.0 mobile/13b143 safari/601.1
		      if (ua.match(/MicroMessenger/i) == 'micromessenger') {
		      return true;
		      } else {
		      return false;
		      }
		    },
			seachbtn: function () {
		      var self = this
		      var b = 0
		      for (var i = 151; i > 20; i--) {
		        (function (i) {
		          var a = i
		          setTimeout(function () {
		            $('.seachimg img').css('margin-left', a / 100 + 'rem')
		            if (i <= 21) {
		              self.seachshow = false
		              self.seachinput = true
		              self.seachrmshow = true
		              setTimeout(function () {
		                document.getElementById('seach').focus()
		              }, 100)
		              self.seachStuta = false
		            }
		          }, 1 * b)
		          b++
		        })(i)
		      }
		    },
		    
		    seachremove: function () {
			// 当点击搜索时的动画
		      this.seachinput = false
		      var self = this
		      self.seachrmshow = false
		      setTimeout(function () {
		        self.seachshow = true
		        $('.seachimg img').css('margin-left', 151 / 100 + 'rem')
		        self.seachStuta = true;
		      }, 100)
		    },
		    seachsend:function(){
		    	var self=this;
		    	localStorage.setItem("nt_keyword",self.seachvalue);
		    	this.$router.push({path:'/seachall'});
		    },
			zhuye: function() {
				window.location.href = 'http://www.ntyouxuan.com/newnt/#/';
			},
			seachsend:function(){
		    	var self=this;
		    	localStorage.setItem("nt_keyword",self.seachvalue);
		    	this.$router.push({path:'/seachall'});
		    },
			seachsendtow:function(data){
		  		localStorage.setItem("nt_keyword",data);
		  		this.seachremove();
		    	var self=this;
		    	self.seachrmshow=false;
				  setTimeout(function () {
				  	self.$router.push({path:'/seachall'});
				  }, 150);
		  	},
			top:function(){
				$('html,body').animate({scrollTop:0},'slow');
			}
		},
		mounted:function(){
			var self=this;
			window.addEventListener("scroll",this.menu);
			this.adurl=location.href;
			$.ajax({
				type:"post",
				url:furl+"index.php?app=ajax_third_login&act=wxjssdk",
				data:{'aurl':self.adurl},
				dataType:'json',
				success:function(res){
					self.wxdata.img_url="http://liangzhong.oss-cn-hangzhou.aliyuncs.com/activity/laba/taqing/dst_taqing.png";
	        		self.wxdata.link="http://www.ntyouxuan.com/newnt/#/taqing";
	        		self.wxdata.title='【农淘优选】踏青节，优质特产4.3元起';
	        		self.wxdata.title_desc="人间四月天，带着美味去撒欢！";
	        		
					if(res.done){
						self.wxdata.appid=res.retval.appid;
						self.wxdata.timestamp=res.retval.timestamp;
						self.wxdata.wxShal=res.retval.wxShal;
						self.wxdata.wxnonceStr=res.retval.wxnonceStr;
						if(self.isWeiXin()){
							self.wxConfig(wx,self.wxdata);
						}
						
					}
				}
			});
			$.ajax({
				type:"get",
				url:furl+"index.php?app=activity&act=outing_spring",
				data:{'token':self.user},
				dataType:'json',
				success:function(data){
					self.yztcimg1 = data.retval.img_01.img; 
					self.yztcimg2 = data.retval.img_02.img; 
					self.yztcimg3 = data.retval.img_03.img; 
					self.yztcimg4 = data.retval.img_04.img; 
					$("#shop-yztc-list-img1").attr("src",self.yztcimg1)
					$("#shop-yztc-list-img2").attr("src",self.yztcimg2)
					$("#shop-yztc-list-img3").attr("src",self.yztcimg3)
					$("#shop-yztc-list-img4").attr("src",self.yztcimg4)
					self.yztclink1 = data.retval.img_01.link; 
					self.yztclink2 = data.retval.img_02.link; 
					self.yztclink3 = data.retval.img_03.link; 
					self.yztclink4 = data.retval.img_04.link; 
					$(".shop-yztc-list-link1").attr("href",self.yztclink1)
					$(".shop-yztc-list-link2").attr("href",self.yztclink2)
					$(".shop-yztc-list-link3").attr("href",self.yztclink3)
					$(".shop-yztc-list-link4").attr("href",self.yztclink4)
					/*-----------------------新鲜水果---------------------*/
					self.xxsgimg = data.retval.goods_list[0][0].default_image
					self.xxsgname = data.retval.goods_list[0][0].goods_name
					self.xxsgyj = data.retval.goods_list[0][0].price
					self.xxsghdj = data.retval.goods_list[0][0].pre_price
					self.xxsgurl = data.retval.goods_list[0][0].goods_id
					$(".xxsg1").attr("src",self.xxsgimg)
					$(".xxsg-bt1").text(self.xxsgname)
					$(".xxsg-yj1").text(self.xxsgyj)
					$(".xxsg-hdj1").text(self.xxsghdj)
					$(".xxsglj1").attr("href","http://www.ntyouxuan.com/newnt/#/shopXQ/"+self.xxsgurl)
					
					self.xxsgimg = data.retval.goods_list[0][1].default_image
					self.xxsgname = data.retval.goods_list[0][1].goods_name
					self.xxsgyj = data.retval.goods_list[0][1].price
					$(".xxsg2").attr("src",self.xxsgimg)
					$(".xxsg-bt2").text(self.xxsgname)
					$(".xxsg-yj2").text(self.xxsgyj)
					self.xxsgurl = data.retval.goods_list[0][1].goods_id
					$(".xxsglj2").attr("href","http://www.ntyouxuan.com/newnt/#/shopXQ/"+self.xxsgurl)
					self.xxsghdj = data.retval.goods_list[0][1].pre_price
					$(".xxsg-hdj2").text(self.xxsghdj)
					
					self.xxsgimg = data.retval.goods_list[0][2].default_image
					self.xxsgname = data.retval.goods_list[0][2].goods_name
					self.xxsgyj = data.retval.goods_list[0][2].price
					$(".xxsg3").attr("src",self.xxsgimg)
					$(".xxsg-bt3").text(self.xxsgname)
					$(".xxsg-yj3").text(self.xxsgyj)
					self.xxsgurl = data.retval.goods_list[0][2].goods_id
					$(".xxsglj3").attr("href","http://www.ntyouxuan.com/newnt/#/shopXQ/"+self.xxsgurl)
					self.xxsghdj = data.retval.goods_list[0][2].pre_price
					$(".xxsg-hdj3").text(self.xxsghdj)
					
					self.xxsgimg = data.retval.goods_list[0][3].default_image
					self.xxsgname = data.retval.goods_list[0][3].goods_name
					self.xxsgyj = data.retval.goods_list[0][3].price
					$(".xxsg4").attr("src",self.xxsgimg)
					$(".xxsg-bt4").text(self.xxsgname)
					$(".xxsg-yj4").text(self.xxsgyj)
					self.xxsgurl = data.retval.goods_list[0][3].goods_id
					$(".xxsglj4").attr("href","http://www.ntyouxuan.com/newnt/#/shopXQ/"+self.xxsgurl)
					self.xxsghdj = data.retval.goods_list[0][3].pre_price
					$(".xxsg-hdj4").text(self.xxsghdj)
					/*----------------------人气美味------------------------------*/
					self.rqmwimg = data.retval.goods_list[1][0].default_image
					self.rqmwname = data.retval.goods_list[1][0].goods_name
					self.rqmwyj = data.retval.goods_list[1][0].price
					$(".rqmw1").attr("src",self.rqmwimg)
					$(".rqmw-bt1").text(self.rqmwname)
					$(".rqmw-yj1").text(self.rqmwyj)
					self.rqmwurl = data.retval.goods_list[1][0].goods_id
					$(".rqmwlj1").attr("href","http://www.ntyouxuan.com/newnt/#/shopXQ/"+self.rqmwurl)
					self.rqmwhdj = data.retval.goods_list[1][0].pre_price
					$(".rqmw-hdj1").text(self.rqmwhdj)
					
					self.rqmwimg = data.retval.goods_list[1][1].default_image
					self.rqmwname = data.retval.goods_list[1][1].goods_name
					self.rqmwyj = data.retval.goods_list[1][1].price
					$(".rqmw2").attr("src",self.rqmwimg)
					$(".rqmw-bt2").text(self.rqmwname)
					$(".rqmw-yj2").text(self.rqmwyj)
					self.rqmwurl = data.retval.goods_list[1][1].goods_id
					$(".rqmwlj2").attr("href","http://www.ntyouxuan.com/newnt/#/shopXQ/"+self.rqmwurl)
					self.rqmwhdj = data.retval.goods_list[1][1].pre_price
					$(".rqmw-hdj2").text(self.rqmwhdj)
					
					self.rqmwimg = data.retval.goods_list[1][2].default_image
					self.rqmwname = data.retval.goods_list[1][2].goods_name
					self.rqmwyj = data.retval.goods_list[1][2].price
					$(".rqmw3").attr("src",self.rqmwimg)
					$(".rqmw-bt3").text(self.rqmwname)
					$(".rqmw-yj3").text(self.rqmwyj)
					self.rqmwurl = data.retval.goods_list[1][2].goods_id
					$(".rqmwlj3").attr("href","http://www.ntyouxuan.com/newnt/#/shopXQ/"+self.rqmwurl)
					self.rqmwhdj = data.retval.goods_list[1][2].pre_price
					$(".rqmw-hdj3").text(self.rqmwhdj)
					
					self.rqmwimg = data.retval.goods_list[1][3].default_image
					self.rqmwname = data.retval.goods_list[1][3].goods_name
					self.rqmwyj = data.retval.goods_list[1][3].price
					$(".rqmw4").attr("src",self.rqmwimg)
					$(".rqmw-bt4").text(self.rqmwname)
					$(".rqmw-yj4").text(self.rqmwyj)
					self.rqmwurl = data.retval.goods_list[1][3].goods_id
					$(".rqmwlj4").attr("href","http://www.ntyouxuan.com/newnt/#/shopXQ/"+self.rqmwurl)
					self.rqmwhdj = data.retval.goods_list[1][3].pre_price
					$(".rqmw-hdj4").text(self.rqmwhdj)
					
					/*------------------------优质特产大聚会------------------------------------------------*/
					self.yztcimg = data.retval.goods_list[2][0].default_image
					self.yztcname = data.retval.goods_list[2][0].goods_name
					self.yztcyj = data.retval.goods_list[2][0].price
					$(".yztc1").attr("src",self.yztcimg)
					$(".yztc-bt1").text(self.yztcname)
					$(".yztc-yj1").text(self.yztcyj)
					self.yztcurl = data.retval.goods_list[2][0].goods_id
					$(".yztclj1").attr("href","http://www.ntyouxuan.com/newnt/#/shopXQ/"+self.yztcurl)
					self.yztchdj = data.retval.goods_list[2][0].pre_price
					$(".yztc-hdj1").text(self.yztchdj)
					
					self.yztcimg = data.retval.goods_list[2][1].default_image
					self.yztcname = data.retval.goods_list[2][1].goods_name
					self.yztcyj = data.retval.goods_list[2][1].price
					$(".yztc2").attr("src",self.yztcimg)
					$(".yztc-bt2").text(self.yztcname)
					$(".yztc-yj2").text(self.yztcyj)
					self.yztcurl = data.retval.goods_list[2][1].goods_id
					$(".yztclj2").attr("href","http://www.ntyouxuan.com/newnt/#/shopXQ/"+self.yztcurl)
					self.yztchdj = data.retval.goods_list[2][1].pre_price
					$(".yztc-hdj2").text(self.yztchdj)
					
					self.yztcimg = data.retval.goods_list[2][2].default_image
					self.yztcname = data.retval.goods_list[2][2].goods_name
					self.yztcyj = data.retval.goods_list[2][2].price
					$(".yztc3").attr("src",self.yztcimg)
					$(".yztc-bt3").text(self.yztcname)
					$(".yztc-yj3").text(self.yztcyj)
					self.yztcurl = data.retval.goods_list[2][2].goods_id
					$(".yztclj3").attr("href","http://www.ntyouxuan.com/newnt/#/shopXQ/"+self.yztcurl)
					self.yztchdj = data.retval.goods_list[2][2].pre_price
					$(".yztc-hdj3").text(self.yztchdj)
					
					self.yztcimg = data.retval.goods_list[2][3].default_image
					self.yztcname = data.retval.goods_list[2][3].goods_name
					self.yztcyj = data.retval.goods_list[2][3].price
					$(".yztc4").attr("src",self.yztcimg)
					$(".yztc-bt4").text(self.yztcname)
					$(".yztc-yj4").text(self.yztcyj)
					self.yztcurl = data.retval.goods_list[2][3].goods_id
					$(".yztclj4").attr("href","http://www.ntyouxuan.com/newnt/#/shopXQ/"+self.yztcurl)
					self.yztchdj = data.retval.goods_list[2][3].pre_price
					$(".yztc-hdj4").text(self.yztchdj)
					
					self.yztcimg = data.retval.goods_list[2][4].default_image
					self.yztcname = data.retval.goods_list[2][4].goods_name
					self.yztcyj = data.retval.goods_list[2][4].price
					$(".yztc5").attr("src",self.yztcimg)
					$(".yztc-bt5").text(self.yztcname)
					$(".yztc-yj5").text(self.yztcyj)
					self.yztcurl = data.retval.goods_list[2][4].goods_id
					$(".yztclj5").attr("href","http://www.ntyouxuan.com/newnt/#/shopXQ/"+self.yztcurl)
					self.yztchdj = data.retval.goods_list[2][4].pre_price
					$(".yztc-hdj5").text(self.yztchdj)
					
					self.yztcimg = data.retval.goods_list[2][5].default_image
					self.yztcname = data.retval.goods_list[2][5].goods_name
					self.yztcyj = data.retval.goods_list[2][5].price
					$(".yztc6").attr("src",self.yztcimg)
					$(".yztc-bt6").text(self.yztcname)
					$(".yztc-yj6").text(self.yztcyj)
					self.yztcurl = data.retval.goods_list[2][5].goods_id
					$(".yztclj6").attr("href","http://www.ntyouxuan.com/newnt/#/shopXQ/"+self.yztcurl)
					self.yztchdj = data.retval.goods_list[2][5].pre_price
					$(".yztc-hdj6").text(self.yztchdj)
					
					/*-------纯粮酿造-------*/
					self.clnzimg = data.retval.goods_list[3][0].default_image
					self.clnzname = data.retval.goods_list[3][0].goods_name
					self.clnzyj = data.retval.goods_list[3][0].price
					$(".clnz1").attr("src",self.clnzimg)
					$(".clnz-bt1").text(self.clnzname)
					$(".clnz-yj1").text(self.clnzyj)
					self.clnzurl = data.retval.goods_list[3][0].goods_id
					$(".clnzlj1").attr("href","http://www.ntyouxuan.com/newnt/#/shopXQ/"+self.clnzurl)
					self.clnzhdj = data.retval.goods_list[3][0].pre_price
					$(".clnz-hdj1").text(self.clnzhdj)
					
					self.clnzimg = data.retval.goods_list[3][1].default_image
					self.clnzname = data.retval.goods_list[3][1].goods_name
					self.clnzyj = data.retval.goods_list[3][1].price
					$(".clnz2").attr("src",self.clnzimg)
					$(".clnz-bt2").text(self.clnzname)
					$(".clnz-yj2").text(self.clnzyj)
					self.clnzurl = data.retval.goods_list[3][1].goods_id
					$(".clnzlj2").attr("href","http://www.ntyouxuan.com/newnt/#/shopXQ/"+self.clnzurl)
					self.clnzhdj = data.retval.goods_list[3][1].pre_price
					$(".clnz-hdj2").text(self.clnzhdj)
					
					self.clnzimg = data.retval.goods_list[3][2].default_image
					self.clnzname = data.retval.goods_list[3][2].goods_name
					self.clnzyj = data.retval.goods_list[3][2].price
					$(".clnz3").attr("src",self.clnzimg)
					$(".clnz-bt3").text(self.clnzname)
					$(".clnz-yj3").text(self.clnzyj)
					self.clnzurl = data.retval.goods_list[3][2].goods_id
					$(".clnzlj3").attr("href","http://www.ntyouxuan.com/newnt/#/shopXQ/"+self.clnzurl)
					self.clnzhdj = data.retval.goods_list[3][2].pre_price
					$(".clnz-hdj3").text(self.clnzhdj)
					
					self.clnzimg = data.retval.goods_list[3][3].default_image
					self.clnzname = data.retval.goods_list[3][3].goods_name
					self.clnzyj = data.retval.goods_list[3][3].price
					$(".clnz4").attr("src",self.clnzimg)
					$(".clnz-bt4").text(self.clnzname)
					$(".clnz-yj4").text(self.clnzyj)
					self.clnzurl = data.retval.goods_list[3][3].goods_id
					$(".clnzlj4").attr("href","http://www.ntyouxuan.com/newnt/#/shopXQ/"+self.clnzurl)
					self.clnzhdj = data.retval.goods_list[3][3].pre_price
					$(".clnz-hdj4").text(self.clnzhdj)
					
					self.clnzimg = data.retval.goods_list[3][4].default_image
					self.clnzname = data.retval.goods_list[3][4].goods_name
					self.clnzyj = data.retval.goods_list[3][4].price
					$(".clnz5").attr("src",self.clnzimg)
					$(".clnz-bt5").text(self.clnzname)
					$(".clnz-yj5").text(self.clnzyj)
					self.clnzurl = data.retval.goods_list[3][4].goods_id
					$(".clnzlj5").attr("href","http://www.ntyouxuan.com/newnt/#/shopXQ/"+self.clnzurl)
					self.clnzhdj = data.retval.goods_list[3][4].pre_price
					$(".clnz-hdj5").text(self.clnzhdj)
					
					self.clnzimg = data.retval.goods_list[3][5].default_image
					self.clnzname = data.retval.goods_list[3][5].goods_name
					self.clnzyj = data.retval.goods_list[3][5].price
					$(".clnz6").attr("src",self.clnzimg)
					$(".clnz-bt6").text(self.clnzname)
					$(".clnz-yj6").text(self.clnzyj)
					self.clnzurl = data.retval.goods_list[3][5].goods_id
					$(".clnzlj6").attr("href","http://www.ntyouxuan.com/newnt/#/shopXQ/"+self.clnzurl)
					self.clnzhdj = data.retval.goods_list[3][5].pre_price
					$(".clnz-hdj6").text(self.clnzhdj)
				}
			});
			$.ajax({
				type: "get",
				url: furl + "index.php?app=ajax&act=new_message",
				dataType: 'json',
				success: function(res) {
					self.xiaoxitx=res.retval.new_message;
					if(self.xiaoxitx == 0){
						$("#xmessage").css("display","none")
					}
					console.log(self.xiaoxitx)
				}
			});
			  
		}
	}
</script>

<style>
	/*banner*/
	.index .bannert{
		width: 100%;
		height: 7.82rem;
		margin-top: 0.9rem;
	}
	.index .bannert img{
		width: 100%;
	}
	/*优惠券*/
	.index .shop{
		width: 100%;
		height: auto;
		background-color: #69AC78;
		overflow: hidden;
		text-align: center;
	}
	.index .shop .shop-yhq{margin-top: 0.46rem;}
	.index .shop .shop-yhq li{float: left;}
	.index .shop .shop-yhq .shop-yhq1 img{
		width: 3.6rem;
		height: 1.69rem;
	}
	.index .shop .shop-yhq .shop-yhq2 img{
		width: 3.73rem;
		height: 1.69rem;
	}
	/*优质特产*/
	.index .shop .shop-yztc{margin-top: 2.46rem;}
	.index .shop .shop-yztc .shop-yztc-logo{width: 6.73rem;height: 0.86rem;position: relative;top: 0.3rem;}	
	.index .shop .shop-yztc .shop-yztc-list{
		width: 6.79rem;
		height: 9.52rem;
		background-color: rgba(255,255,255,0.4);
		margin:0 auto;
		border-radius: 0.24rem;
		overflow: hidden;
	}
	.index .shop .shop-yztc .shop-yztc-list ul{margin-top: 0.28rem;}
	.index .shop .shop-yztc .shop-yztc-list ul li{
		float: left;
		margin-left: 0.19rem;
		margin-top: 0.2rem;
	}
	.index .shop .shop-yztc .shop-yztc-list img{
		width: 3.14rem;
		height: 4.2rem;
	}
	/*精品五折起*/
	.index .shop .shop-jpwz{margin-top: 0.8rem;}
	.index .shop .shop-jpwz .shop-jpwz-logo{width: 6.73rem;height: 0.86rem;position: relative;top: 0.3rem;}	
	.index .shop .shop-jpwz .shop-jpwz-list{
		width: 6.79rem;
		height: 10.21rem;
		background-color: rgba(255,255,255,0.4);
		margin:0 auto;
		border-radius: 0.24rem;
		overflow: hidden;
	}
	.index .shop .shop-jpwz .shop-jpwz-list ul{margin-top: 0.58rem;}
	.index .shop .shop-jpwz .shop-jpwz-list ul li{
		/*margin-left: 0.19rem;*/
		margin-top: 0.18rem;
	}
	.index .shop .shop-jpwz .shop-jpwz-list img{
		width: 6.42rem;
		height: 2.18rem;
	}
	/*新鲜水果正当时*/
	.index .shop .shop-xxsg{margin-top: 0.8rem;}
	.index .shop .shop-xxsg-list{
		margin-left: 0.1rem;
		margin-top: 0.48rem;
	}
	.index .shop .shop-xxsg .shop-xxsg-logo{width: 6.73rem;height: 0.86rem;position: relative;top: 0.3rem;}	
	.index .shop .shop-xxsg-list li{
		width: 3.3rem;
		height: 4.58rem;
		border-radius: 0.16rem;
		background-color: #FFFFFF;
		float: left;
		margin-left: 0.25rem;
		margin-top: 0.28rem;
		text-align: center;
	}
	.index .shop .shop-xxsg-list li .shop-xxsg-list-tt{
		width: 2.91rem;
		height: 2.85rem;
		margin-top: 0.18rem;
	}
	.index .shop .shop-xxsg-list li .bt{
		font-size: 0.28rem;
		color: #3E3D3D;
		margin-top: 0.17rem;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap; 
	}
	.index .shop .shop-xxsg-list li .jiagexx{
		text-align: left;
		margin-left: 0.19rem;
	}
	.index .shop .shop-xxsg-list li .yj{
		font-size: 0.18rem;
		color: #5F2810;
		text-decoration: line-through;
	}
	.index .shop .shop-xxsg-list li .hdj{
		font-size: 0.23rem;
		color: #E64949;
		font-weight: bold;
	}
	.index .shop .shop-xxsg-list li .shop-xxsg-list-btn{
		width: 1.3rem;
		height: 0.44rem;
		/*margin-top: -38%;
		margin-left: 50%;*/
		float: right;
		margin-top: -0.5rem;
		margin-right: 0.2rem;
		
	}
	
	/*底部*/
	.index .footer-btn{
		width: 7.25rem;
		height: 1.4rem;
		margin-left: 6px;
		margin-top: 790px;
	}
	.index .footer-btn img{
		width: 100%;
	}
	.index .footer-wz span{
		font-size: 0.31rem;
		color: #FFFFFF;
		font-weight: bold;
	}
	
</style>